package controller;

import entity.Student;
import service.StudentService;
import service.StudentServiceImpl;

import java.util.List;

/**
 * @Author:SA
 * @DATA:DATA
 * 学生请求的控制层
 */


public class StudentController {
    private StudentService studentService = new StudentServiceImpl();

    //添加
    public boolean addStudent(String id,String sname){
       return studentService.addStudent(id,sname);

    }

    //删除
    public boolean delStudent(String  id){
        return studentService.delStudent(id);

    }
    //分班 更新
    public boolean divideClass(int stuNo,String className){
        return studentService.divideClass(stuNo,className);
    }
    //查询所有学生信息 并显示班级的名称
    public List<Student> selectAll(){
        return studentService.selectAll();
    }

}
